Prizm Content Connect
How to Configure C# Samples

Installation

  1. Ensure that Microsoft’s Internet Information Service (IIS) is enabled (http://msdn.microsoft.com/en-us/library/ms181052(v=vs.80).aspx) on the computer that will be running the C# sample.
  2. Begin the installation of Prizm Content Connect for Windows.
  3. During the installation of Prizm Content Connect, make sure to select the following options:

    1. Configure samples with IIS.
    2. Re-register ASP.NET 4.0 with IIS: The Prizm Content Connect C# sample requires ASP.NET 4.0 to function. If ASP.NET is already configured, this will not undo any current configurations.

    3. After the installation, test the sample application in a browser:
      • The following will route you directly to the HTML 5 viewer sample splash page: http://myservername:18000/PrizmCC_HTML5_Viewer_CS

    4. From the splash page you have two options:
      • 1) Choice of viewer:
        • You can choose to load either the Full Viewer or the Book Reader                    
      • 2) Select a sample document -OR- upload a document:
        • You can choose any of the 5 sample documents (Word, PDF, CAD, Tiff, or JPEG).
        • Or, you can upload a document from an arbitrary location on your computer. Note that dragging and dropping a file on this page is not supported in Internet Explorer 8.
    5. Full Viewer
      • If you select Full Viewer on the splash page, then documents will be viewed with the full-featured, out-of-the-box responsive viewer:

    6. Book Reader
      • If you select Book Reader on the splash page, then documents will be viewed with the book reader. The book reader demonstrates how the PCC viewer can be heavily customized:

C# Directory Structure

The C# samples are installed under C:\prizm\Samples\.net\cs\. This folder contains 3 sub-folders, one folder for each of the two samples (book-reader-sample and full-viewer-sample) and one folder for the splash page:

Each of the sample folders are completely self-contained, meaning that they contain all of the files needed to run the sample. Furthermore, with the exception of a few project files and build files, the sample folders contain only the files needed to run the sample.

Folder contents: full-viewer-sample

File / Folder

Description

App_Code folder

Contains classes that support the communication between the viewer and PCC RESTful services. While the code for the classes can be modified as needed, modifications should be done with care. See viewer-webtier/pcc.ashx to see how most of these classes are used.

Files in this folder starting with PccViewer.WebTier.Core are essential and must be re-distributed to run the full viewer.

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the viewer.

viewer-assets/less folder

Contains less that can be used to build the viewer CSS. This folder is non-essential, and does not need to be re-distributed.

viewer-assets/Gruntfile.js

Contains Grunt tasks to build the viewer less. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less.

viewer-webtier folder

Contains files that implement the C#/ASP.NET layer of communication between the client-side viewer and the PCC backend services.

The viewer-webtier files consume the classes implemented in the App_Code folder.

viewer-webtier/pcc.ashx

This file handles all incoming requests from the viewer. This file does one of two things: 1) it proxies these requests to the PCC RESTful API, 2) it delegates processing to the classes defined in App_Code.

viewer-webtier/pcc.config

Defines the configuration for the web tier. Configuration parameters include: Path to source documents, path to saved markup files, path to image stamp files, and connection settings for the PCC RESTful API.

Default.aspx, Default.aspx.cs

The default page for the sample. This page loads the full viewer.

web.config

Contains IIS settings.

predefinedSearch.json

This data file contains information defining search queries that will appear as selectable items in the full viewer.

Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the predefined search terms are provided as a JavaScript hash, when the viewer is created.

redactionReason.json

This data file contains information defining redaction reasons that are available in the viewer.

Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the redaction reasons are provided as a JavaScript hash, when the viewer is created.

Folder contents: book-reader-sample

File / Folder

Description

App_Code folder

Contains classes that support the communication between the viewer and PCC RESTful services. While the code for the classes can be modified as needed, modifications should be done with care. See viewer-webtier/pcc.ashx to see how most of these classes are used.

Files in this folder starting with PccViewer.WebTier.Core are typically considered essential and must be re-distributed to run the full viewer. However, for the book reader, some of these classes are not required to be re-distributed.

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the book reader viewer.

viewer-assets/less folder

Contains less that can be used to build the book reader CSS. This folder is non-essential, and does not need to be re-distributed.

viewer-assets/Gruntifle

Contains Grunt tasks to build the reader less. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less.

viewer-assets/selection.json

A file used by the IcoMoon application to generate the icons in the book reader viewer.  If you need to add an icon to the viewer, you can add the icon to this file and use the IcoMoon application (https://icomoon.io) to generate a new icon font. This file is non-essential and does not need to be re-distributed.

viewer-webtier folder

Contains files that implement the C#/ASP.NET layer of communication between the client-side book reader viewer and the PCC backend services.

The viewer-webtier files consume the classes implemented in the App_Code folder.

viewer-webtier/createSession.ashx

This file is used by index.html to create a PCC Viewing Session with the PCC RESTful API.

viewer-webtier/pcc.ashx

This file handles all incoming requests from the book reader viewer. This file does one of two things: 1) it proxies these requests to the PCC RESTful API, 2) it delegates processing to the classes defined in App_Code.

viewer-webtier/pcc.config

Defines the configuration for the web tier. Configuration parameters include: Path to source documents, path to saved markup files, path to image stamp files, and connection settings for the PCC RESTful API.

index.html

The default page for the sample. This page calls the createSession.ashx service to start a viewing session with the PCC RESTful services and then the page loads the book reader.

sample-config.js

Contains references to the assets, web tier, and language files used by the viewer in this sample.

web.config

Contains IIS settings.

Configuration with pcc.config

The file pcc.config is used to configure the resources and storage used by the viewer web tier. This file can be found in each sample folder at: <sample-folder-name>/viewer-webtier/pcc.config. This file is self-documenting, but a little information about the configuration options is given below.

<DocumentPath>

The sample pulls named documents from this location. The DocumentPath must have read/write permissions in order for the file drag and drop functionality of the splash page to work.

<ImageStampPath>

The sample pulls image stamps from this location. Any valid image stamp in this folder will be available to the viewer for use as an image stamp. The ImageStampPath must have read permissions.

<ValidImageStampTypes>

A comma separated value list of file extensions. These extensions specify the valid image stamp file types. Only images in the ImageStampPath with a valid file type will be available for use as an image stamp in the viewer.

<MarkupsPath>

Saved markup XML is kept in this folder. The MarkupsPath will be written to by the web server process, so it must have read/write permissions.

<WebService[Scheme|Host|Port|Path|V2Path]>

Specifies how to connect with the PCC RESTful API.

 

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback